package org.skyer.third.gateway.api.constant.jd;

import org.skyer.third.gateway.api.enums.CommonOrderRefundStatusEnum;
import org.skyer.third.gateway.api.enums.CommonOrderStatusEnum;

import java.util.HashMap;
import java.util.Map;


public class JdOrderStatusConstant {
    /***
     *  //京东订单状态 	1）WAIT_SELLER_STOCK_OUT 等待出库 2）WAIT_GOODS_RECEIVE_CONFIRM 等待确认收货
     *         // 3）WAIT_SELLER_DELIVERY等待发货（只适用于海外购商家）4) POP_ORDER_PAUSE POP暂停
     *         // 5）FINISHED_L 完成 6）TRADE_CANCELED 取消 7）LOCKED 已锁定 8）WAIT_SEND_CODE 等待发码
     *         // 只获取WAIT_GOODS_RECEIVE_CONFIRM 等待确认收货 FINISHED_L 完成  TRADE_CANCELED 取消
     */
    public final  static String WAIT_SELLER_STOCK_OUT="WAIT_SELLER_STOCK_OUT";

    /**
    * WAIT_GOODS_RECEIVE_CONFIRM 等待确认收货
    */
    public final  static String WAIT_GOODS_RECEIVE_CONFIRM="WAIT_GOODS_RECEIVE_CONFIRM";

    /**
     * 取消
     */
    public final  static String TRADE_CANCELED="TRADE_CANCELED";


    /**
     * 完成
     */
    public final  static String FINISHED_L="FINISHED_L";



    public final static Map<String, Integer> JD_ORDER_STATUS_MAP = new HashMap() {
        {
            //20待发货
            put("WAIT_SELLER_STOCK_OUT", CommonOrderStatusEnum.TO_BE_SHIPPED.getCode());
            //40已发货
            put("WAIT_GOODS_RECEIVE_CONFIRM", CommonOrderStatusEnum.SHIPPED.getCode());
            //50交易完成
            put("FINISHED_L", CommonOrderStatusEnum.TRADE_SUCCESS.getCode());
            //60交易关闭
            put("TRADE_CANCELED", CommonOrderStatusEnum.TRADE_CLOSE.getCode());
        }
    };





    public final static Map<Long, Integer> JD_ORDER_REFUND_STATUS_MAP = new HashMap() {
        {   //退款申请单状态 0、未审核 1、审核通过2、审核不通过
            // 3、京东财务审核通过 4、京东财务审核不通过 5、人工审核通过 6、拦截并退款
            // 7、青龙拦截成功 8、青龙拦截失败 9、强制关单并退款 10、物流待跟进 11、用户撤销。不传是查询全部状态

            put(11L, CommonOrderRefundStatusEnum.REFUND_CLOSE.getCode());

            put(3L, CommonOrderRefundStatusEnum.REFUND_SUCCESS.getCode());

            put(0L, CommonOrderRefundStatusEnum.REFUND.getCode());

            put(1L, CommonOrderRefundStatusEnum.REFUND.getCode());

            put(5L, CommonOrderRefundStatusEnum.REFUND.getCode());

            put(6L, CommonOrderRefundStatusEnum.REFUND.getCode());

            put(7L, CommonOrderRefundStatusEnum.REFUND.getCode());

            put(8L, CommonOrderRefundStatusEnum.REFUND.getCode());

            put(9L, CommonOrderRefundStatusEnum.REFUND.getCode());

            put(10L, CommonOrderRefundStatusEnum.REFUND.getCode());

        }
    };



}
